import Vue from 'vue'
import Router from 'vue-router'
import module from '@/components/module'  //组件案例页面
import errorPage from '@/components/errorpage';
import stopPage from '@/components/stoppage'; //服务器停机页面
import {IndexRoutes} from '@/components/index/router/index.routes.js';
import {LoginRoutes} from '@/components/login/router/login.routes.js';
import {MineRoutes} from '@/components/mine/router/mine.routes.js';
import {DriverRoutes} from '@/components/driver/router/driver.routes.js';
import {OperationRoutes} from '@/components/Operation/router/operation.routes.js';
import {MessageRoutes} from '@/components/message/router/message.routes.js';
import {QuestionnaireRoutes} from '@/components/Questionnaire/router/Questionnaire.routes.js';
import {PickClassRoutes} from '@/components/PickClass/router/PickClass.routes.js';
import {QrCodeRoutes} from '@/components/QrCode/router/QrCode.routes.js';
import {PaintingsRoutes} from '@/components/Paintings/router/Paintings.routes.js';
Vue.use(Router)

export default new Router({
  // mode: 'history',
  routes: [
    //路径重定向
    { path: '/', redirect: '/FillInfo' },
    // ...TransitionRoutes,
    ...LoginRoutes,
    ...MineRoutes,
    ...IndexRoutes,
    ...DriverRoutes,
    ...OperationRoutes,
    ...MessageRoutes,
    ...QuestionnaireRoutes,
    ...PickClassRoutes,
    ...QrCodeRoutes,
    ...PaintingsRoutes,
    {
      path: '/module',
      name: 'module',
      component: module
    },
    {
      path: '/stop',
      name: 'stopPage',
      component: stopPage
    },
    //默认错误地址跳转页
    {
      path: '*',
      name: 'errorPage',
      component: errorPage
    }
  ]
})
